package demo;

public class Test {
    public static void test1(Animal animal) {
        animal.eat();
    }

    public static void test2(IRunning iRunning) {
        iRunning.run();
    }

    public static void test3(IFlying iFlying) {
        iFlying.fly();
    }

    public static void test4(ISwimming iSwimming) {
        iSwimming.swim();
    }

    public static void main(String[] args) {
        Bird bird=new Bird("小鸟",12);
        Dog dog=new Dog("旺财",3);
        Robot robot=new Robot("小星一号",1);
        test1(bird);
        test3(bird);
        System.out.println("============");
        test2(robot);
    }

}
